<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Graphics Contexts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Points-Rectangles-and-Regions.html" title="Points, Rectangles and Regions">
<link rel="next" href="gdk-Drawing-Primitives.html" title="Drawing Primitives">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Points-Rectangles-and-Regions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK 2 Reference Manual</th>
<td><a accesskey="n" href="gdk-Drawing-Primitives.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk-Graphics-Contexts.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk-Graphics-Contexts.description" class="shortcut">Description</a>
                   | 
                  <a href="#gdk-Graphics-Contexts.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk-Graphics-Contexts"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-Graphics-Contexts.top_of_page"></a>Graphics Contexts</span></h2>
<p>Graphics Contexts — Objects to encapsulate drawing properties</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk-Graphics-Contexts.synopsis"></a><h2>Synopsis</h2>
<a name="GdkGC"></a><pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

                    <a class="link" href="gdk-Graphics-Contexts.html#GdkGC-struct" title="GdkGC">GdkGC</a>;
struct              <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues">GdkGCValues</a>;
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask" title="enum GdkGCValuesMask">GdkGCValuesMask</a>;
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkFunction" title="enum GdkFunction">GdkFunction</a>;
<a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-new" title="gdk_gc_new ()">gdk_gc_new</a>                          (<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>);
<a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-new-with-values" title="gdk_gc_new_with_values ()">gdk_gc_new_with_values</a>              (<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask" title="enum GdkGCValuesMask"><span class="type">GdkGCValuesMask</span></a> values_mask</code></em>);
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-get-screen" title="gdk_gc_get_screen ()">gdk_gc_get_screen</a>                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
<a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-ref" title="gdk_gc_ref ()">gdk_gc_ref</a>                          (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-unref" title="gdk_gc_unref ()">gdk_gc_unref</a>                        (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
#define             <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-destroy" title="gdk_gc_destroy">gdk_gc_destroy</a>
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-values" title="gdk_gc_set_values ()">gdk_gc_set_values</a>                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask" title="enum GdkGCValuesMask"><span class="type">GdkGCValuesMask</span></a> values_mask</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-get-values" title="gdk_gc_get_values ()">gdk_gc_get_values</a>                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-foreground" title="gdk_gc_set_foreground ()">gdk_gc_set_foreground</a>               (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-background" title="gdk_gc_set_background ()">gdk_gc_set_background</a>               (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color" title="gdk_gc_set_rgb_fg_color ()">gdk_gc_set_rgb_fg_color</a>             (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color" title="gdk_gc_set_rgb_bg_color ()">gdk_gc_set_rgb_bg_color</a>             (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-font" title="gdk_gc_set_font ()">gdk_gc_set_font</a>                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-function" title="gdk_gc_set_function ()">gdk_gc_set_function</a>                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkFunction" title="enum GdkFunction"><span class="type">GdkFunction</span></a> function</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-fill" title="gdk_gc_set_fill ()">gdk_gc_set_fill</a>                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkFill" title="enum GdkFill"><span class="type">GdkFill</span></a> fill</code></em>);
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkFill" title="enum GdkFill">GdkFill</a>;
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-tile" title="gdk_gc_set_tile ()">gdk_gc_set_tile</a>                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *tile</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-stipple" title="gdk_gc_set_stipple ()">gdk_gc_set_stipple</a>                  (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *stipple</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-ts-origin" title="gdk_gc_set_ts_origin ()">gdk_gc_set_ts_origin</a>                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin" title="gdk_gc_set_clip_origin ()">gdk_gc_set_clip_origin</a>              (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-mask" title="gdk_gc_set_clip_mask ()">gdk_gc_set_clip_mask</a>                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> *mask</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-rectangle" title="gdk_gc_set_clip_rectangle ()">gdk_gc_set_clip_rectangle</a>           (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle" title="struct GdkRectangle"><span class="type">GdkRectangle</span></a> *rectangle</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-region" title="gdk_gc_set_clip_region ()">gdk_gc_set_clip_region</a>              (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion"><span class="type">GdkRegion</span></a> *region</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-subwindow" title="gdk_gc_set_subwindow ()">gdk_gc_set_subwindow</a>                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkSubwindowMode" title="enum GdkSubwindowMode"><span class="type">GdkSubwindowMode</span></a> mode</code></em>);
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkSubwindowMode" title="enum GdkSubwindowMode">GdkSubwindowMode</a>;
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-exposures" title="gdk_gc_set_exposures ()">gdk_gc_set_exposures</a>                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exposures</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-line-attributes" title="gdk_gc_set_line_attributes ()">gdk_gc_set_line_attributes</a>          (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> line_width</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkLineStyle" title="enum GdkLineStyle"><span class="type">GdkLineStyle</span></a> line_style</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkCapStyle" title="enum GdkCapStyle"><span class="type">GdkCapStyle</span></a> cap_style</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkJoinStyle" title="enum GdkJoinStyle"><span class="type">GdkJoinStyle</span></a> join_style</code></em>);
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkLineStyle" title="enum GdkLineStyle">GdkLineStyle</a>;
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkCapStyle" title="enum GdkCapStyle">GdkCapStyle</a>;
enum                <a class="link" href="gdk-Graphics-Contexts.html#GdkJoinStyle" title="enum GdkJoinStyle">GdkJoinStyle</a>;
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-dashes" title="gdk_gc_set_dashes ()">gdk_gc_set_dashes</a>                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dash_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint8"><span class="type">gint8</span></a> dash_list[]</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-copy" title="gdk_gc_copy ()">gdk_gc_copy</a>                         (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *dst_gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *src_gc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-colormap" title="gdk_gc_set_colormap ()">gdk_gc_set_colormap</a>                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>);
<a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="returnvalue">GdkColormap</span></a> *       <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-get-colormap" title="gdk_gc_get_colormap ()">gdk_gc_get_colormap</a>                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-offset" title="gdk_gc_offset ()">gdk_gc_offset</a>                       (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y_offset</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk-Graphics-Contexts.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GdkGC
</pre>
</div>
<div class="refsect1">
<a name="gdk-Graphics-Contexts.description"></a><h2>Description</h2>
<p>
All drawing operations in GDK take a
<em class="firstterm">graphics context</em> (GC) argument.
A graphics context encapsulates information about
the way things are drawn, such as the foreground
color or line width. By using graphics contexts,
the number of arguments to each drawing call is
greatly reduced, and communication overhead is
minimized, since identical arguments do not need
to be passed repeatedly.
</p>
<p>
Most values of a graphics context can be set at
creation time by using <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-new-with-values" title="gdk_gc_new_with_values ()"><code class="function">gdk_gc_new_with_values()</code></a>,
or can be set one-by-one using functions such
as <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-foreground" title="gdk_gc_set_foreground ()"><code class="function">gdk_gc_set_foreground()</code></a>. A few of the values
in the GC, such as the dash pattern, can only
be set by the latter method.
</p>
</div>
<div class="refsect1">
<a name="gdk-Graphics-Contexts.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkGC-struct"></a><h3>GdkGC</h3>
<pre class="programlisting">typedef struct _GdkGC GdkGC;</pre>
<p>
The <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> structure represents a graphics context.
It is an opaque structure with no user-visible
elements.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkGCValues"></a><h3>struct GdkGCValues</h3>
<pre class="programlisting">struct GdkGCValues {
  GdkColor	    foreground;
  GdkColor	    background;
  GdkFont	   *font;
  GdkFunction	    function;
  GdkFill	    fill;
  GdkPixmap	   *tile;
  GdkPixmap	   *stipple;
  GdkPixmap	   *clip_mask;
  GdkSubwindowMode  subwindow_mode;
  gint		    ts_x_origin;
  gint		    ts_y_origin;
  gint		    clip_x_origin;
  gint		    clip_y_origin;
  gint		    graphics_exposures;
  gint		    line_width;
  GdkLineStyle	    line_style;
  GdkCapStyle	    cap_style;
  GdkJoinStyle	    join_style;
};
</pre>
<p>
The <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> structure holds a set of values used
to create or modify a graphics context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> <em class="structfield"><code><a name="GdkGCValues.foreground"></a>foreground</code></em>;</span></p></td>
<td>the foreground color. Note that <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-get-values" title="gdk_gc_get_values ()"><code class="function">gdk_gc_get_values()</code></a>
only sets the pixel value.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> <em class="structfield"><code><a name="GdkGCValues.background"></a>background</code></em>;</span></p></td>
<td>the background color. Note that <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-get-values" title="gdk_gc_get_values ()"><code class="function">gdk_gc_get_values()</code></a>
only sets the pixel value.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *<em class="structfield"><code><a name="GdkGCValues.font"></a>font</code></em>;</span></p></td>
<td>the default font.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkFunction" title="enum GdkFunction"><span class="type">GdkFunction</span></a> <em class="structfield"><code><a name="GdkGCValues.function"></a>function</code></em>;</span></p></td>
<td>the bitwise operation used when drawing.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkFill" title="enum GdkFill"><span class="type">GdkFill</span></a> <em class="structfield"><code><a name="GdkGCValues.fill"></a>fill</code></em>;</span></p></td>
<td>the fill style.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *<em class="structfield"><code><a name="GdkGCValues.tile"></a>tile</code></em>;</span></p></td>
<td>the tile pixmap.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *<em class="structfield"><code><a name="GdkGCValues.stipple"></a>stipple</code></em>;</span></p></td>
<td>the stipple bitmap.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *<em class="structfield"><code><a name="GdkGCValues.clip-mask"></a>clip_mask</code></em>;</span></p></td>
<td>the clip mask bitmap.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkSubwindowMode" title="enum GdkSubwindowMode"><span class="type">GdkSubwindowMode</span></a> <em class="structfield"><code><a name="GdkGCValues.subwindow-mode"></a>subwindow_mode</code></em>;</span></p></td>
<td>the subwindow mode.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.ts-x-origin"></a>ts_x_origin</code></em>;</span></p></td>
<td>the x origin of the tile or stipple.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.ts-y-origin"></a>ts_y_origin</code></em>;</span></p></td>
<td>the y origin of the tile or stipple.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.clip-x-origin"></a>clip_x_origin</code></em>;</span></p></td>
<td>the x origin of the clip mask.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.clip-y-origin"></a>clip_y_origin</code></em>;</span></p></td>
<td>the y origin of the clip mask.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.graphics-exposures"></a>graphics_exposures</code></em>;</span></p></td>
<td>whether graphics exposures are enabled.</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GdkGCValues.line-width"></a>line_width</code></em>;</span></p></td>
<td>the line width.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkLineStyle" title="enum GdkLineStyle"><span class="type">GdkLineStyle</span></a> <em class="structfield"><code><a name="GdkGCValues.line-style"></a>line_style</code></em>;</span></p></td>
<td>the way dashed lines are drawn.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkCapStyle" title="enum GdkCapStyle"><span class="type">GdkCapStyle</span></a> <em class="structfield"><code><a name="GdkGCValues.cap-style"></a>cap_style</code></em>;</span></p></td>
<td>the way the ends of lines are drawn.</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gdk-Graphics-Contexts.html#GdkJoinStyle" title="enum GdkJoinStyle"><span class="type">GdkJoinStyle</span></a> <em class="structfield"><code><a name="GdkGCValues.join-style"></a>join_style</code></em>;</span></p></td>
<td>the way joins between lines are drawn.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkGCValuesMask"></a><h3>enum GdkGCValuesMask</h3>
<pre class="programlisting">typedef enum {
  GDK_GC_FOREGROUND    = 1 &lt;&lt; 0,
  GDK_GC_BACKGROUND    = 1 &lt;&lt; 1,
  GDK_GC_FONT	       = 1 &lt;&lt; 2,
  GDK_GC_FUNCTION      = 1 &lt;&lt; 3,
  GDK_GC_FILL	       = 1 &lt;&lt; 4,
  GDK_GC_TILE	       = 1 &lt;&lt; 5,
  GDK_GC_STIPPLE       = 1 &lt;&lt; 6,
  GDK_GC_CLIP_MASK     = 1 &lt;&lt; 7,
  GDK_GC_SUBWINDOW     = 1 &lt;&lt; 8,
  GDK_GC_TS_X_ORIGIN   = 1 &lt;&lt; 9,
  GDK_GC_TS_Y_ORIGIN   = 1 &lt;&lt; 10,
  GDK_GC_CLIP_X_ORIGIN = 1 &lt;&lt; 11,
  GDK_GC_CLIP_Y_ORIGIN = 1 &lt;&lt; 12,
  GDK_GC_EXPOSURES     = 1 &lt;&lt; 13,
  GDK_GC_LINE_WIDTH    = 1 &lt;&lt; 14,
  GDK_GC_LINE_STYLE    = 1 &lt;&lt; 15,
  GDK_GC_CAP_STYLE     = 1 &lt;&lt; 16,
  GDK_GC_JOIN_STYLE    = 1 &lt;&lt; 17
} GdkGCValuesMask;
</pre>
<p>
A set of bit flags used to indicate which fields
<a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> structure are set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-GC-FOREGROUND:CAPS"></a><span class="term"><code class="literal">GDK_GC_FOREGROUND</code></span></p></td>
<td>the <em class="parameter"><code>foreground</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-BACKGROUND:CAPS"></a><span class="term"><code class="literal">GDK_GC_BACKGROUND</code></span></p></td>
<td>the <em class="parameter"><code>background</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-FONT:CAPS"></a><span class="term"><code class="literal">GDK_GC_FONT</code></span></p></td>
<td>the <em class="parameter"><code>font</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-FUNCTION:CAPS"></a><span class="term"><code class="literal">GDK_GC_FUNCTION</code></span></p></td>
<td>the <em class="parameter"><code>function</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-FILL:CAPS"></a><span class="term"><code class="literal">GDK_GC_FILL</code></span></p></td>
<td>the <em class="parameter"><code>fill</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-TILE:CAPS"></a><span class="term"><code class="literal">GDK_GC_TILE</code></span></p></td>
<td>the <em class="parameter"><code>tile</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-STIPPLE:CAPS"></a><span class="term"><code class="literal">GDK_GC_STIPPLE</code></span></p></td>
<td>the <em class="parameter"><code>stipple</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-CLIP-MASK:CAPS"></a><span class="term"><code class="literal">GDK_GC_CLIP_MASK</code></span></p></td>
<td>the <em class="parameter"><code>clip_mask</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-SUBWINDOW:CAPS"></a><span class="term"><code class="literal">GDK_GC_SUBWINDOW</code></span></p></td>
<td>the <em class="parameter"><code>subwindow_mode</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-TS-X-ORIGIN:CAPS"></a><span class="term"><code class="literal">GDK_GC_TS_X_ORIGIN</code></span></p></td>
<td>the <em class="parameter"><code>ts_x_origin</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-TS-Y-ORIGIN:CAPS"></a><span class="term"><code class="literal">GDK_GC_TS_Y_ORIGIN</code></span></p></td>
<td>the <em class="parameter"><code>ts_y_origin</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-CLIP-X-ORIGIN:CAPS"></a><span class="term"><code class="literal">GDK_GC_CLIP_X_ORIGIN</code></span></p></td>
<td>the <em class="parameter"><code>clip_x_origin</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-CLIP-Y-ORIGIN:CAPS"></a><span class="term"><code class="literal">GDK_GC_CLIP_Y_ORIGIN</code></span></p></td>
<td>the <em class="parameter"><code>clip_y_origin</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-EXPOSURES:CAPS"></a><span class="term"><code class="literal">GDK_GC_EXPOSURES</code></span></p></td>
<td>the <em class="parameter"><code>graphics_exposures</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-LINE-WIDTH:CAPS"></a><span class="term"><code class="literal">GDK_GC_LINE_WIDTH</code></span></p></td>
<td>the <em class="parameter"><code>line_width</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-LINE-STYLE:CAPS"></a><span class="term"><code class="literal">GDK_GC_LINE_STYLE</code></span></p></td>
<td>the <em class="parameter"><code>line_style</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-CAP-STYLE:CAPS"></a><span class="term"><code class="literal">GDK_GC_CAP_STYLE</code></span></p></td>
<td>the <em class="parameter"><code>cap_style</code></em> is set.
</td>
</tr>
<tr>
<td><p><a name="GDK-GC-JOIN-STYLE:CAPS"></a><span class="term"><code class="literal">GDK_GC_JOIN_STYLE</code></span></p></td>
<td>the <em class="parameter"><code>join_style</code></em> is set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkFunction"></a><h3>enum GdkFunction</h3>
<pre class="programlisting">typedef enum {
  GDK_COPY,
  GDK_INVERT,
  GDK_XOR,
  GDK_CLEAR,
  GDK_AND,
  GDK_AND_REVERSE,
  GDK_AND_INVERT,
  GDK_NOOP,
  GDK_OR,
  GDK_EQUIV,
  GDK_OR_REVERSE,
  GDK_COPY_INVERT,
  GDK_OR_INVERT,
  GDK_NAND,
  GDK_NOR,
  GDK_SET
} GdkFunction;
</pre>
<p>
Determines how the bit values for the source pixels are combined with
the bit values for destination pixels to produce the final result. The
sixteen values here correspond to the 16 different possible 2x2 truth
tables.  Only a couple of these values are usually useful; for colored
images, only <a class="link" href="gdk-Graphics-Contexts.html#GDK-COPY:CAPS"><code class="literal">GDK_COPY</code></a>, <a class="link" href="gdk-Graphics-Contexts.html#GDK-XOR:CAPS"><code class="literal">GDK_XOR</code></a> and <a class="link" href="gdk-Graphics-Contexts.html#GDK-INVERT:CAPS"><code class="literal">GDK_INVERT</code></a> are generally
useful. For bitmaps, <a class="link" href="gdk-Graphics-Contexts.html#GDK-AND:CAPS"><code class="literal">GDK_AND</code></a> and <a class="link" href="gdk-Graphics-Contexts.html#GDK-OR:CAPS"><code class="literal">GDK_OR</code></a> are also useful.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-COPY:CAPS"></a><span class="term"><code class="literal">GDK_COPY</code></span></p></td>
<td>
<code class="literal">dst = src</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-INVERT:CAPS"></a><span class="term"><code class="literal">GDK_INVERT</code></span></p></td>
<td>
<code class="literal">dst = NOT dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-XOR:CAPS"></a><span class="term"><code class="literal">GDK_XOR</code></span></p></td>
<td>
<code class="literal">dst = src XOR dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-CLEAR:CAPS"></a><span class="term"><code class="literal">GDK_CLEAR</code></span></p></td>
<td>
<code class="literal">dst = 0</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-AND:CAPS"></a><span class="term"><code class="literal">GDK_AND</code></span></p></td>
<td>
<code class="literal">dst = dst AND src</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-AND-REVERSE:CAPS"></a><span class="term"><code class="literal">GDK_AND_REVERSE</code></span></p></td>
<td>
<code class="literal">dst = src AND (NOT dst)</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-AND-INVERT:CAPS"></a><span class="term"><code class="literal">GDK_AND_INVERT</code></span></p></td>
<td>
<code class="literal">dst = (NOT src) AND dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-NOOP:CAPS"></a><span class="term"><code class="literal">GDK_NOOP</code></span></p></td>
<td>
<code class="literal">dst = dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-OR:CAPS"></a><span class="term"><code class="literal">GDK_OR</code></span></p></td>
<td>
<code class="literal">dst = src OR dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-EQUIV:CAPS"></a><span class="term"><code class="literal">GDK_EQUIV</code></span></p></td>
<td>
<code class="literal">dst = (NOT src) XOR dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-OR-REVERSE:CAPS"></a><span class="term"><code class="literal">GDK_OR_REVERSE</code></span></p></td>
<td>
<code class="literal">dst = src OR (NOT dst)</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-COPY-INVERT:CAPS"></a><span class="term"><code class="literal">GDK_COPY_INVERT</code></span></p></td>
<td>
<code class="literal">dst = NOT src</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-OR-INVERT:CAPS"></a><span class="term"><code class="literal">GDK_OR_INVERT</code></span></p></td>
<td>
<code class="literal">dst = (NOT src) OR dst</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-NAND:CAPS"></a><span class="term"><code class="literal">GDK_NAND</code></span></p></td>
<td>
<code class="literal">dst = (NOT src) OR (NOT dst)</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-NOR:CAPS"></a><span class="term"><code class="literal">GDK_NOR</code></span></p></td>
<td>
<code class="literal">dst = (NOT src) AND (NOT dst)</code>
</td>
</tr>
<tr>
<td><p><a name="GDK-SET:CAPS"></a><span class="term"><code class="literal">GDK_SET</code></span></p></td>
<td>
<code class="literal">dst = 1</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-new"></a><h3>gdk_gc_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             gdk_gc_new                          (<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_new</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo for rendering.</p>
</div>
<p>
Create a new graphics context with default values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used
with drawables of the same depth as this one.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new graphics context.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-new-with-values"></a><h3>gdk_gc_new_with_values ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             gdk_gc_new_with_values              (<em class="parameter"><code><a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> *drawable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask" title="enum GdkGCValuesMask"><span class="type">GdkGCValuesMask</span></a> values_mask</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_new_with_values</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo for rendering.</p>
</div>
<p>
Create a new GC with the given initial values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used
with drawables of the same depth as this one.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
<td>a structure containing initial values for the GC.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values_mask</code></em> :</span></p></td>
<td>a bit mask indicating which fields in <em class="parameter"><code>values</code></em>
are set.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new graphics context.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-get-screen"></a><h3>gdk_gc_get_screen ()</h3>
<pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         gdk_gc_get_screen                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_get_screen</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for which <em class="parameter"><code>gc</code></em> was created
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for <em class="parameter"><code>gc</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-ref"></a><h3>gdk_gc_ref ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="returnvalue">GdkGC</span></a> *             gdk_gc_ref                          (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_ref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> instead.</p>
</div>
<p>
Deprecated function; use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the gc.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-unref"></a><h3>gdk_gc_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_unref                        (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_unref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> instead.</p>
</div>
<p>
Decrement the reference count of <em class="parameter"><code>gc</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-destroy"></a><h3>gdk_gc_destroy</h3>
<pre class="programlisting">#define gdk_gc_destroy                 g_object_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_destroy</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> instead</p>
</div>
<p>
This function is obsolete and should not be used.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-values"></a><h3>gdk_gc_set_values ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_values                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask" title="enum GdkGCValuesMask"><span class="type">GdkGCValuesMask</span></a> values_mask</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_values</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo for rendering.</p>
</div>
<p>
Sets attributes of a graphics context in bulk. For each flag set in
<em class="parameter"><code>values_mask</code></em>, the corresponding field will be read from <em class="parameter"><code>values</code></em> and
set as the new value for <em class="parameter"><code>gc</code></em>. If you're only setting a few values
on <em class="parameter"><code>gc</code></em>, calling individual "setter" functions is likely more
convenient.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
<td>struct containing the new values</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values_mask</code></em> :</span></p></td>
<td>mask indicating which struct fields are to be used</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-get-values"></a><h3>gdk_gc_get_values ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_get_values                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> *values</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_get_values</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo for rendering.</p>
</div>
<p>
Retrieves the current values from a graphics context. Note that 
only the pixel values of the <em class="parameter"><code>values-&gt;foreground</code></em> and <em class="parameter"><code>values-&gt;background</code></em>
are filled, use <a class="link" href="gdk-Colormaps-and-Colors.html#gdk-colormap-query-color" title="gdk_colormap_query_color ()"><code class="function">gdk_colormap_query_color()</code></a> to obtain the rgb values
if you need them.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> structure in which to store the results.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-foreground"></a><h3>gdk_gc_set_foreground ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_foreground               (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_foreground</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-color" title="gdk_cairo_set_source_color ()"><code class="function">gdk_cairo_set_source_color()</code></a> to use a <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a>
as the source in Cairo.</p>
</div>
<p>
Sets the foreground color for a graphics context.
Note that this function uses <em class="parameter"><code>color-&gt;pixel</code></em>, use 
<a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color" title="gdk_gc_set_rgb_fg_color ()"><code class="function">gdk_gc_set_rgb_fg_color()</code></a> to specify the foreground 
color as red, green, blue components.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>the new foreground color.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-background"></a><h3>gdk_gc_set_background ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_background               (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_background</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-color" title="gdk_cairo_set_source_color ()"><code class="function">gdk_cairo_set_source_color()</code></a> to use a <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a>
as the source in Cairo. Note that if you want to draw a background and a
foreground in Cairo, you need to call drawing functions (like <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a>)
twice.</p>
</div>
<p>
Sets the background color for a graphics context.
Note that this function uses <em class="parameter"><code>color-&gt;pixel</code></em>, use 
<a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color" title="gdk_gc_set_rgb_bg_color ()"><code class="function">gdk_gc_set_rgb_bg_color()</code></a> to specify the background 
color as red, green, blue components.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>the new background color.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-rgb-fg-color"></a><h3>gdk_gc_set_rgb_fg_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_rgb_fg_color             (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_rgb_fg_color</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-color" title="gdk_cairo_set_source_color ()"><code class="function">gdk_cairo_set_source_color()</code></a> instead.</p>
</div>
<p>
Set the foreground color of a GC using an unallocated color. The
pixel value for the color will be determined using GdkRGB. If the
colormap for the GC has not previously been initialized for GdkRGB,
then for pseudo-color colormaps (colormaps with a small modifiable
number of colors), a colorcube will be allocated in the colormap.
</p>
<p>
Calling this function for a GC without a colormap is an error.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>an unallocated <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-rgb-bg-color"></a><h3>gdk_gc_set_rgb_bg_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_rgb_bg_color             (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_rgb_bg_color</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-color" title="gdk_cairo_set_source_color ()"><code class="function">gdk_cairo_set_source_color()</code></a> instead.</p>
</div>
<p>
Set the background color of a GC using an unallocated color. The
pixel value for the color will be determined using GdkRGB. If the
colormap for the GC has not previously been initialized for GdkRGB,
then for pseudo-color colormaps (colormaps with a small modifiable
number of colors), a colorcube will be allocated in the colormap.
</p>
<p>
Calling this function for a GC without a colormap is an error.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>an unallocated <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-font"></a><h3>gdk_gc_set_font ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_font                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Fonts.html#GdkFont" title="GdkFont"><span class="type">GdkFont</span></a> *font</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_font</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Sets the font for a graphics context. (Note that
all text-drawing functions in GDK take a <em class="parameter"><code>font</code></em>
argument; the value set here is used when that
argument is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>the new font.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-function"></a><h3>gdk_gc_set_function ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_function                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkFunction" title="enum GdkFunction"><span class="type">GdkFunction</span></a> function</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_function</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-operator"><code class="function">cairo_set_operator()</code></a> with Cairo.</p>
</div>
<p>
Determines how the current pixel values and the
pixel values being drawn are combined to produce
the final pixel values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>function</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Graphics-Contexts.html#GdkFunction" title="enum GdkFunction"><span class="type">GdkFunction</span></a> to use</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-fill"></a><h3>gdk_gc_set_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_fill                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkFill" title="enum GdkFill"><span class="type">GdkFill</span></a> fill</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_fill</code> has been deprecated since version 2.22 and should not be used in newly-written code. You can achieve tiling in Cairo by using
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-set-extend"><code class="function">cairo_pattern_set_extend()</code></a> on the source. For stippling, see the
deprecation comments on <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-stipple" title="gdk_gc_set_stipple ()"><code class="function">gdk_gc_set_stipple()</code></a>.</p>
</div>
<p>
Set the fill mode for a graphics context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
<td>the new fill mode.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkFill"></a><h3>enum GdkFill</h3>
<pre class="programlisting">typedef enum {
  GDK_SOLID,
  GDK_TILED,
  GDK_STIPPLED,
  GDK_OPAQUE_STIPPLED
} GdkFill;
</pre>
<p>
Determines how primitives are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-SOLID:CAPS"></a><span class="term"><code class="literal">GDK_SOLID</code></span></p></td>
<td>draw with the foreground color.
</td>
</tr>
<tr>
<td><p><a name="GDK-TILED:CAPS"></a><span class="term"><code class="literal">GDK_TILED</code></span></p></td>
<td>draw with a tiled pixmap.
</td>
</tr>
<tr>
<td><p><a name="GDK-STIPPLED:CAPS"></a><span class="term"><code class="literal">GDK_STIPPLED</code></span></p></td>
<td>draw using the stipple bitmap. Pixels corresponding
  to bits in the stipple bitmap that are set will be drawn in the
  foreground color; pixels corresponding to bits that are
  not set will be left untouched.
</td>
</tr>
<tr>
<td><p><a name="GDK-OPAQUE-STIPPLED:CAPS"></a><span class="term"><code class="literal">GDK_OPAQUE_STIPPLED</code></span></p></td>
<td>draw using the stipple bitmap. Pixels corresponding
  to bits in the stipple bitmap that are set will be drawn in the
  foreground color; pixels corresponding to bits that are
  not set will be drawn with the background color.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-tile"></a><h3>gdk_gc_set_tile ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_tile                     (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *tile</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_tile</code> has been deprecated since version 2.22 and should not be used in newly-written code. The following code snippet sets a tiling <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>
as the source in Cairo:
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-pixmap">gdk_cairo_set_source_pixmap</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> tile</span><span class="symbol">,</span><span class="normal"> ts_origin_x</span><span class="symbol">,</span><span class="normal"> ts_origin_y</span><span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-set-extend">cairo_pattern_set_extend</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-get-source">cairo_get_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">),</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#CAIRO-EXTEND-REPEAT:CAPS">CAIRO_EXTEND_REPEAT</a></span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p>
Set a tile pixmap for a graphics context.
This will only be used if the fill mode
is <a class="link" href="gdk-Graphics-Contexts.html#GDK-TILED:CAPS"><code class="literal">GDK_TILED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tile</code></em> :</span></p></td>
<td>the new tile pixmap.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-stipple"></a><h3>gdk_gc_set_stipple ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_stipple                  (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> *stipple</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_stipple</code> has been deprecated since version 2.22 and should not be used in newly-written code. Stippling has no direct replacement in Cairo. If you
want to achieve an identical look, you can use the stipple bitmap as a
mask. Most likely, this involves rendering the source to an intermediate
surface using <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-push-group"><code class="function">cairo_push_group()</code></a> first, so that you can then use
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-mask"><code class="function">cairo_mask()</code></a> to achieve the stippled look.</p>
</div>
<p>
Set the stipple bitmap for a graphics context. The
stipple will only be used if the fill mode is
<a class="link" href="gdk-Graphics-Contexts.html#GDK-STIPPLED:CAPS"><code class="literal">GDK_STIPPLED</code></a> or <a class="link" href="gdk-Graphics-Contexts.html#GDK-OPAQUE-STIPPLED:CAPS"><code class="literal">GDK_OPAQUE_STIPPLED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stipple</code></em> :</span></p></td>
<td>the new stipple bitmap.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-ts-origin"></a><h3>gdk_gc_set_ts_origin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_ts_origin                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_ts_origin</code> has been deprecated since version 2.22 and should not be used in newly-written code. You can set the origin for tiles and stipples in Cairo
by changing the source's matrix using <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-set-matrix"><code class="function">cairo_pattern_set_matrix()</code></a>. Or you
can specify it with <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-pixmap" title="gdk_cairo_set_source_pixmap ()"><code class="function">gdk_cairo_set_source_pixmap()</code></a> as shown in the example
for <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-tile" title="gdk_gc_set_tile ()"><code class="function">gdk_gc_set_tile()</code></a>.</p>
</div>
<p>
Set the origin when using tiles or stipples with
the GC. The tile or stipple will be aligned such
that the upper left corner of the tile or stipple
will coincide with this point.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>the x-coordinate of the origin.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>the y-coordinate of the origin.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-clip-origin"></a><h3>gdk_gc_set_clip_origin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_clip_origin              (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_clip_origin</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-translate"><code class="function">cairo_translate()</code></a> before applying the clip path in
Cairo.</p>
</div>
<p>
Sets the origin of the clip mask. The coordinates are
interpreted relative to the upper-left corner of
the destination drawable of the current operation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>the x-coordinate of the origin.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>the y-coordinate of the origin.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-clip-mask"></a><h3>gdk_gc_set_clip_mask ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_clip_mask                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap" title="GdkBitmap"><span class="type">GdkBitmap</span></a> *mask</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_clip_mask</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-mask"><code class="function">cairo_mask()</code></a> instead.</p>
</div>
<p>
Sets the clip mask for a graphics context from a bitmap.
The clip mask is interpreted relative to the clip
origin. (See <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin" title="gdk_gc_set_clip_origin ()"><code class="function">gdk_gc_set_clip_origin()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>a bitmap.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-clip-rectangle"></a><h3>gdk_gc_set_clip_rectangle ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_clip_rectangle           (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle" title="struct GdkRectangle"><span class="type">GdkRectangle</span></a> *rectangle</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_clip_rectangle</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-rectangle"><code class="function">cairo_rectangle()</code></a> and <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> in Cairo.</p>
</div>
<p>
Sets the clip mask for a graphics context from a
rectangle. The clip mask is interpreted relative to the clip
origin. (See <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin" title="gdk_gc_set_clip_origin ()"><code class="function">gdk_gc_set_clip_origin()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rectangle</code></em> :</span></p></td>
<td>the rectangle to clip to.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-clip-region"></a><h3>gdk_gc_set_clip_region ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_clip_region              (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion"><span class="type">GdkRegion</span></a> *region</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_clip_region</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="gdk-Cairo-Interaction.html#gdk-cairo-region" title="gdk_cairo_region ()"><code class="function">gdk_cairo_region()</code></a> and <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-clip"><code class="function">cairo_clip()</code></a> in Cairo.</p>
</div>
<p>
Sets the clip mask for a graphics context from a region structure.
The clip mask is interpreted relative to the clip origin. (See
<a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin" title="gdk_gc_set_clip_origin ()"><code class="function">gdk_gc_set_clip_origin()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>region</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion" title="GdkRegion"><span class="type">GdkRegion</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-subwindow"></a><h3>gdk_gc_set_subwindow ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_subwindow                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkSubwindowMode" title="enum GdkSubwindowMode"><span class="type">GdkSubwindowMode</span></a> mode</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_subwindow</code> has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement. If you need to control
subwindows, you must use drawing operations of the underlying window
system manually. Cairo will always use <a class="link" href="gdk-Graphics-Contexts.html#GDK-INCLUDE-INFERIORS:CAPS"><code class="literal">GDK_INCLUDE_INFERIORS</code></a> on sources
and masks and <a class="link" href="gdk-Graphics-Contexts.html#GDK-CLIP-BY-CHILDREN:CAPS"><code class="literal">GDK_CLIP_BY_CHILDREN</code></a> on targets.</p>
</div>
<p>
Sets how drawing with this GC on a window will affect child
windows of that window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the subwindow mode.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkSubwindowMode"></a><h3>enum GdkSubwindowMode</h3>
<pre class="programlisting">typedef enum {
  GDK_CLIP_BY_CHILDREN = 0,
  GDK_INCLUDE_INFERIORS = 1
} GdkSubwindowMode;
</pre>
<p>
Determines how drawing onto a window will affect child
windows of that window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-CLIP-BY-CHILDREN:CAPS"></a><span class="term"><code class="literal">GDK_CLIP_BY_CHILDREN</code></span></p></td>
<td>only draw onto the window itself.
</td>
</tr>
<tr>
<td><p><a name="GDK-INCLUDE-INFERIORS:CAPS"></a><span class="term"><code class="literal">GDK_INCLUDE_INFERIORS</code></span></p></td>
<td>draw onto the window and child windows.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-exposures"></a><h3>gdk_gc_set_exposures ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_exposures                (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> exposures</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_exposures</code> has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement. If you need to control
exposures, you must use drawing operations of the underlying window
system or use <a class="link" href="gdk-Windows.html#gdk-window-invalidate-rect" title="gdk_window_invalidate_rect ()"><code class="function">gdk_window_invalidate_rect()</code></a>. Cairo will never
generate exposures.</p>
</div>
<p>
Sets whether copying non-visible portions of a drawable
using this graphics context generate exposure events
for the corresponding regions of the destination
drawable. (See <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-drawable" title="gdk_draw_drawable ()"><code class="function">gdk_draw_drawable()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>exposures</code></em> :</span></p></td>
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, exposure events will be generated.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-line-attributes"></a><h3>gdk_gc_set_line_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_line_attributes          (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> line_width</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkLineStyle" title="enum GdkLineStyle"><span class="type">GdkLineStyle</span></a> line_style</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkCapStyle" title="enum GdkCapStyle"><span class="type">GdkCapStyle</span></a> cap_style</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkJoinStyle" title="enum GdkJoinStyle"><span class="type">GdkJoinStyle</span></a> join_style</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_line_attributes</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use the Cairo functions <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>,
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>, <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a> and <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a>
to affect the stroking behavior in Cairo. Keep in mind that the default
attributes of a <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> are different from the default attributes of
a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</p>
</div>
<p>
Sets various attributes of how lines are drawn. See
the corresponding members of <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues" title="struct GdkGCValues"><span class="type">GdkGCValues</span></a> for full
explanations of the arguments.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line_width</code></em> :</span></p></td>
<td>the width of lines.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line_style</code></em> :</span></p></td>
<td>the dash-style for lines.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cap_style</code></em> :</span></p></td>
<td>the manner in which the ends of lines are drawn.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>join_style</code></em> :</span></p></td>
<td>the in which lines are joined together.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkLineStyle"></a><h3>enum GdkLineStyle</h3>
<pre class="programlisting">typedef enum {
  GDK_LINE_SOLID,
  GDK_LINE_ON_OFF_DASH,
  GDK_LINE_DOUBLE_DASH
} GdkLineStyle;
</pre>
<p>
Determines how lines are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-LINE-SOLID:CAPS"></a><span class="term"><code class="literal">GDK_LINE_SOLID</code></span></p></td>
<td>lines are drawn solid.
</td>
</tr>
<tr>
<td><p><a name="GDK-LINE-ON-OFF-DASH:CAPS"></a><span class="term"><code class="literal">GDK_LINE_ON_OFF_DASH</code></span></p></td>
<td>even segments are drawn; odd segments are not drawn.
</td>
</tr>
<tr>
<td><p><a name="GDK-LINE-DOUBLE-DASH:CAPS"></a><span class="term"><code class="literal">GDK_LINE_DOUBLE_DASH</code></span></p></td>
<td>even segments are normally. Odd segments are drawn
  in the background color if the fill style is <a class="link" href="gdk-Graphics-Contexts.html#GDK-SOLID:CAPS"><code class="literal">GDK_SOLID</code></a>, or in the background
  color masked by the stipple if the fill style is <a class="link" href="gdk-Graphics-Contexts.html#GDK-STIPPLED:CAPS"><code class="literal">GDK_STIPPLED</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkCapStyle"></a><h3>enum GdkCapStyle</h3>
<pre class="programlisting">typedef enum {
  GDK_CAP_NOT_LAST,
  GDK_CAP_BUTT,
  GDK_CAP_ROUND,
  GDK_CAP_PROJECTING
} GdkCapStyle;
</pre>
<p>
Determines how the end of lines are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-CAP-NOT-LAST:CAPS"></a><span class="term"><code class="literal">GDK_CAP_NOT_LAST</code></span></p></td>
<td>the same as <a class="link" href="gdk-Graphics-Contexts.html#GDK-CAP-BUTT:CAPS"><code class="literal">GDK_CAP_BUTT</code></a> for lines of non-zero width.
       for zero width lines, the final point on the line will not be drawn.
</td>
</tr>
<tr>
<td><p><a name="GDK-CAP-BUTT:CAPS"></a><span class="term"><code class="literal">GDK_CAP_BUTT</code></span></p></td>
<td>the ends of the lines are drawn squared off and extending
       to the coordinates of the end point.
</td>
</tr>
<tr>
<td><p><a name="GDK-CAP-ROUND:CAPS"></a><span class="term"><code class="literal">GDK_CAP_ROUND</code></span></p></td>
<td>the ends of the lines are drawn as semicircles with the
       diameter equal to the line width and centered at the end point.
</td>
</tr>
<tr>
<td><p><a name="GDK-CAP-PROJECTING:CAPS"></a><span class="term"><code class="literal">GDK_CAP_PROJECTING</code></span></p></td>
<td>the ends of the lines are drawn squared off and extending
       half the width of the line beyond the end point.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkJoinStyle"></a><h3>enum GdkJoinStyle</h3>
<pre class="programlisting">typedef enum {
  GDK_JOIN_MITER,
  GDK_JOIN_ROUND,
  GDK_JOIN_BEVEL
} GdkJoinStyle;
</pre>
<p>
Determines how the joins between segments of a polygon are drawn.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-JOIN-MITER:CAPS"></a><span class="term"><code class="literal">GDK_JOIN_MITER</code></span></p></td>
<td>the sides of each line are extended to meet at an angle.
</td>
</tr>
<tr>
<td><p><a name="GDK-JOIN-ROUND:CAPS"></a><span class="term"><code class="literal">GDK_JOIN_ROUND</code></span></p></td>
<td>the sides of the two lines are joined by a circular arc.
</td>
</tr>
<tr>
<td><p><a name="GDK-JOIN-BEVEL:CAPS"></a><span class="term"><code class="literal">GDK_JOIN_BEVEL</code></span></p></td>
<td>the sides of the two lines are joined by a straight line which
       makes an equal angle with each line.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-dashes"></a><h3>gdk_gc_set_dashes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_dashes                   (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> dash_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint8"><span class="type">gint8</span></a> dash_list[]</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_dashes</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-dash"><code class="function">cairo_set_dash()</code></a> to set the dash in Cairo.</p>
</div>
<p>
Sets the way dashed-lines are drawn. Lines will be
drawn with alternating on and off segments of the
lengths specified in <em class="parameter"><code>dash_list</code></em>. The manner in
which the on and off segments are drawn is determined
by the <em class="parameter"><code>line_style</code></em> value of the GC. (This can
be changed with <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-line-attributes" title="gdk_gc_set_line_attributes ()"><code class="function">gdk_gc_set_line_attributes()</code></a>.)
</p>
<p>
The <em class="parameter"><code>dash_offset</code></em> defines the phase of the pattern, 
specifying how many pixels into the dash-list the pattern 
should actually begin.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dash_offset</code></em> :</span></p></td>
<td>the phase of the dash pattern.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dash_list</code></em> :</span></p></td>
<td>an array of dash lengths.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>the number of elements in <em class="parameter"><code>dash_list</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-copy"></a><h3>gdk_gc_copy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_copy                         (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *dst_gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *src_gc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_copy</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo for drawing. <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>
can be helpful in cases where you'd have copied a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</p>
</div>
<p>
Copy the set of values from one graphics context
onto another graphics context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dst_gc</code></em> :</span></p></td>
<td>the destination graphics context.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_gc</code></em> :</span></p></td>
<td>the source graphics context.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-set-colormap"></a><h3>gdk_gc_set_colormap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_set_colormap                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_set_colormap</code> has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement. Cairo handles colormaps
automatically, so there is no need to care about them.</p>
</div>
<p>
Sets the colormap for the GC to the given colormap. The depth
of the colormap's visual must match the depth of the drawable
for which the GC was created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>colormap</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-get-colormap"></a><h3>gdk_gc_get_colormap ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="returnvalue">GdkColormap</span></a> *       gdk_gc_get_colormap                 (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_get_colormap</code> has been deprecated since version 2.22 and should not be used in newly-written code. There is no replacement. Cairo handles colormaps
automatically, so there is no need to care about them.</p>
</div>
<p>
Retrieves the colormap for a given GC, if it exists.
A GC will have a colormap if the drawable for which it was created
has a colormap, or if a colormap was set explicitely with
gdk_gc_set_colormap.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the colormap of <em class="parameter"><code>gc</code></em>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>gc</code></em> doesn't have one.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-gc-offset"></a><h3>gdk_gc_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_gc_offset                       (<em class="parameter"><code><a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y_offset</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_gc_offset</code> has been deprecated since version 2.22 and should not be used in newly-written code. There is no direct replacement, as this is just a
convenience function for gdk_gc_set_ts_origin and <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-clip-origin" title="gdk_gc_set_clip_origin ()"><code class="function">gdk_gc_set_clip_origin()</code></a>.</p>
</div>
<p>
Offset attributes such as the clip and tile-stipple origins
of the GC so that drawing at x - x_offset, y - y_offset with
the offset GC  has the same effect as drawing at x, y with the original
GC.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
<td>amount by which to offset the GC in the X direction</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
<td>amount by which to offset the GC in the Y direction</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>